import ComplaintApi from '@/api/ComplaintApi';
import { ComplaintEntity } from '@/entities/ComplaintEntity';

export default class ComplaintBusiness {
  /**
   * 添加投诉记录
   * @param data
   */
  static addComplaint(data: ComplaintEntity.IAddComplaint) {
    return ComplaintApi.addComplaint(data);
  }

  /**
   * 通过id获取投诉信息
   * @param complaintId
   * @param identity
   */
  static getComplaint(complaintId: number, identity: number) {
    return ComplaintApi.getComplaint(complaintId, identity);
  }

  /**
   * 通过房东id获取投诉信息
   * @param landlordId
   */
  static getComplaintByLandlordId(landlordId: number) {
    return ComplaintApi.getComplaintByLandlordId(landlordId);
  }

  /**
   * 更新投诉状态
   * @param complaintId 维修id
   * @param status 状态
   */
  static updateComplaintStatus(complaintId: number, status: number) {
    return ComplaintApi.updateComplaintStatus(complaintId, status);
  }
}